package metrics_sql

const (
	KubernetsNodeName = `
from(bucket: "data")
  |> range(start: %v, stop: %v)
  |> filter(fn: (r) => r["_measurement"] == "prometheus_remote_write")
  |> filter(fn: (r) => r["_field"] == "kubelet_node_name")
  |> filter(fn: (r) => r["metrics_path"] == "/metrics")
  |> filter(fn: (r) => r["prometheus_replica"] == "prometheus-%v-0")
  |> last()
  |> map(fn: (r) => ({_field:"node_name",_value:r._value,_time:r._time,node:r["node"]}))
`
)
